<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/2/27 0027
  Time: 11:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>后台登录</title>
    <jsp:include page="common/head.jsp"/>
    <script src="${requestScope.webRoot}static/js/jquery/jquery-1.11.3.min.js"></script>

    <link rel="stylesheet" href="${requestScope.webRoot}static/bootstrap/base/css/bootstrap.min.css">
    <script src="${requestScope.webRoot}static/bootstrap/base/js/bootstrap.min.js"></script>

    <!-- 表单验证 -->
    <script type="text/javascript" src="${requestScope.webRoot}static/js/jquery/jquery.form.js"></script>
    <link rel="stylesheet" href="${requestScope.webRoot}static/bootstrap/validator/bootstrapValidator.min.css">
    <script src="${requestScope.webRoot}static/bootstrap/validator/bootstrapValidator.min.js"></script>

    <script src="${requestScope.webRoot}static/js/control/modal/hintModal.js"></script>

</head>
<body>
<br><br><br>
<div class="col-lg-4 col-lg-offset-4 col-md-4 col-md-offset-4 col-sm-6 col-sm-offset-3 col-xs-10 col-xs-offset-1 control-label container">
    <div class="row col-lg-10 col-lg-offset-1">
        <form id="login" class="form-horizontal" role="form" method="post">
            <div class="form-group col-sm-12">
                <div class="input-group">
                    <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
                    <input class="form-control" name="username" type="text" placeholder="账号"/>
                </div>
            </div>
            <div class="form-group col-sm-12">
                <div class="input-group">
                    <span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
                    <input class="form-control" name="password" type="password" placeholder="密码"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-12">
                    <button class="submit col-sm-8 col-sm-offset-2 col-xs-12 btn btn-primary" type="button" >登录</button>
                </div>
            </div>
        </form>
    </div>
</div>
<%--<!-- 模态框（Modal） -->--%>
<div class="modal fade" id="error"></div>
<script src="${requestScope.webRoot}static/js/control/form/BootstrapValidateBaseForm.js"></script>
<script src="${requestScope.webRoot}static/js/control/form/AdminLoginForm.js"></script>
<script>

    $(document).keydown(function(e){
        var keyCode = e.keyCode ? e.keyCode : e.which ? e.which : e.charCode; //兼容IE 火狐 谷歌

        if (keyCode == 13) {
            $("#submit").trigger("click");
            return false;
        }
    });

    $(function(){
        var loginForm = new AdminLoginForm({
            $form:$("#login"),
            $error:$("#error")
        });
        loginForm.setType("login");
    });
</script>
</body>
</html>
